<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:s="http://jboss.org/seam/faces"
	xmlns:o="http://omnifaces.org/ui"
	xmlns:of="http://omnifaces.org/functions"
	xmlns:sig="http://java.sun.com/jsf/composite/components">

	<p:column styleClass="columnCenter" width="5%">
	    <f:facet name="header">Data</f:facet>
	    <h:outputText value="#{of:formatDate(entity.data, 'dd/MM/yyyy')}" />
	</p:column>
	<p:column styleClass="columnCenter" width="5%">
	    <f:facet name="header">Dt. Pag.</f:facet>
	    <h:outputText value="#{of:formatDate(entity.dataDePagamento, 'dd/MM/yyyy')}" />
	</p:column>	
	<p:column styleClass="columnCenter" width="5%">
	    <f:facet name="header">Tipo</f:facet>
	    <h:outputText value="#{entity.tipo}" styleClass="columnRight" />
	</p:column>	
	<p:column styleClass="columnCenter" width="30%">
	    <f:facet name="header">Fretista</f:facet>
	    <h:outputText value="#{entity.fretista.pessoaFisica.nome}" styleClass="columnRight" />
	</p:column>
	<p:column styleClass="columnCenter" width="35%">
	    <f:facet name="header">Cliente</f:facet>
	    <h:outputText value="#{entity.locacao.cliente.pessoa.nome}" styleClass="columnLeft" rendered="#{entity.locacao.cliente.pessoa.pessoaFisica}"/>
	    <h:outputText value="#{entity.locacao.cliente.pessoa.razaoSocial}" styleClass="columnLeft" rendered="#{entity.locacao.cliente.pessoa.pessoaJuridica}"/>	    
	</p:column>
	<p:column styleClass="columnRight" width="5%">
	    <f:facet name="header">V. Cobr.</f:facet>
	    <h:outputText value="#{entity.valorCobrado}" styleClass="columnLeft">
	    	<f:convertNumber pattern="#{messages['mask.money']}" />
	    </h:outputText>	    
	</p:column>
	<p:column styleClass="columnRight" width="5%">
	    <f:facet name="header">V. Pago</f:facet>
	    <h:outputText value="#{entity.valorPago}" styleClass="columnLeft">
	    	<f:convertNumber pattern="#{messages['mask.money']}" />
	    </h:outputText>	    
	</p:column>
	<p:column styleClass="columnRight" width="5%">
	    <f:facet name="header">Receita</f:facet>
	    <h:outputText value="#{entity.receita}" styleClass="columnLeft">
	    	<f:convertNumber pattern="#{messages['mask.money']}" />
	    </h:outputText>	    
	</p:column>	
	
</ui:composition>